<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.opensymphony.xwork2.util.ValueStack"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%
	ValueStack vs = (ValueStack) request
			.getAttribute("struts.valueStack");
	ArrayList<List<String>> report = (ArrayList<List<String>>) vs
			.findValue("salaryReport");
	List<String> header = report.get(0);
	int s1 = header.indexOf("部门");
	int e1 = header.indexOf("应发合计");
	int e2 = header.indexOf("应扣合计");
	int cs = e1 - s1;
	int cs2 = e2 - e1;
%>
<style>
<!--
table.lynn-mytable09 { 
width: 700px; 
padding: 0; 
margin: 0; 
} 

caption { 
padding: 0 0 5px 0; 
width: 700px; 
font: italic 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; 
text-align: right; 
} 

th.sr2-th90 { 
font: bold 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif; 
color: #4f6b72; 
border-right: 1px solid #C1DAD7; 
border-bottom: 1px solid #C1DAD7; 
border-top: 1px solid #C1DAD7; 
letter-spacing: 2px; 
text-transform: uppercase; 
text-align: left; 
padding: 6px 6px 6px 12px; 
background: #CAE8EA  no-repeat; 
} 

td.sr2-td32 { 
border-right: 1px solid #C1DAD7; 
border-bottom: 1px solid #C1DAD7; 
background: #fff; 
font-size:11px; 
padding: 6px 6px 6px 12px; 
color: #4f6b72; 
} 
-->
</style>
<table class="lynn-mytable09" border="1">
	<tr>
		<th class="sr2-th90" rowspan="2">
			编号
		</th>
		<th class="sr2-th90" rowspan="2">
			姓名
		</th>
		<th class="sr2-th90" rowspan="2">
			部门
		</th>
		<th class="sr2-th90" colspan="<%=cs%>">
			应发工资（单位：元）
		</th>
		<th class="sr2-th90" colspan="<%=cs2%>">
			应扣工资（单位：元）
		</th>
		<th class="sr2-th90" rowspan="2">
			实发工资
		</th>
	</tr>
	<tr>
		<%
			for (int i = s1 + 1; i <= e2; i++) {
				String n = header.get(i);
		%>
		<th class="sr2-th90">
			<%=n%>
		</th>

		<%
			}
		%>
	</tr>
	<%
		for (int i = 1; i < report.size(); i++) {
			List<String> row = report.get(i);
	%>
	<tr>
		<td class="sr2-td32">
			<%=i%>
		</td>

		<%
			for (int j = 1; j < row.size(); j++) {
		%>
		<td class="sr2-td32">
			<%=row.get(j)%>
		</td>
		<%
			}
		%>
	</tr>
	<%
		}
	%>
</table>